import Layout from '@/layout'

const bookRouter = {
  path: '/book',
  component: Layout,
  redirect: '/book/table',
  name: 'Book',
  meta: {
    title: '图书管理'
  },
  children: [
    {
      path: 'table',
      component: () => import('@/views/book/table'),
      name: 'BookTable',
      meta: { title: '图书列表', noCache: false }
    },
    {
      path: 'create',
      component: () => import('@/views/book/form'),
      name: 'BookCreate',
      meta: { title: '新增图书', noCache: false }
    },
    {
      path: 'edit/:id',
      component: () => import('@/views/book/form'),
      name: 'BookEdit',
      meta: { title: '编辑图书', noCache: false },
      hidden: true
    }
  ]
}

export default bookRouter

